Skip to content

fix(release): include lockfile changes in has_changes()#4020

Closed
Will-hxw wants to merge 1 commit intomodelcontextprotocol:mainfrom
Will-hxw:fix/3870-release-lockfile
Closed

fix(release): include lockfile changes in has_changes()#4020
Will-hxw wants to merge 1 commit intomodelcontextprotocol:mainfrom
Will-hxw:fix/3870-release-lockfile

Conversation

@Will-hxw
Copy link
Copy Markdown

Summary

  • has_changes() in scripts/release.py now also checks for lockfile changes (uv.lock, package-lock.json, pnpm-lock.yaml, yarn.lock) in addition to .py and .ts files

Why

Issue #3870: When a package only has lockfile changes between release tags, has_changes() returned False because it only checked .py and .ts suffixes. This caused pyproject.toml versions to be skipped during version bump (e.g., src/git/ stayed at 0.6.2 instead of the CalVer tag), breaking SBOM/CVE scanners that key off the version field.

Fix

# Before
relevant_files = [f for f in changed_files if f.suffix in [".py", ".ts"]]

# After
relevant_files = [
    f
    for f in changed_files
    if f.suffix in [".py", ".ts"]
    or f.name in ("uv.lock", "package-lock.json", "pnpm-lock.yaml", "yarn.lock")
]

Validation

  • Python syntax check passed
  • Only affects release script (scripts/release.py), no runtime code changes

Related

🤖 Generated with Claude Code

has_changes() only considered .py and .ts files, causing
packages with only lockfile changes to be skipped during
version bump. Now also checks for common lockfile names:
uv.lock, package-lock.json, pnpm-lock.yaml, yarn.lock.

Fixes #3870
@Will-hxw Will-hxw closed this by deleting the head repository Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release script skips version bump for packages with only lockfile changes

1 participant